package com.yc.service.system.doctor;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yc.dao.DaoSupport;
import com.yc.entity.Page;
import com.yc.util.PageData;


@Service
public class DoctorAdditionService implements IDoctorAdditionService {
	
	@Resource(name = "daoSupport")
	private DaoSupport dao;

	@Override
	public List<PageData> getDoctorAdditionList(Page page) throws Exception {
		return (List<PageData>) dao.findForList("DoctorAdditionBookingMapper.additionBookinglistPage", page);
	}

	@Override
	public void save(PageData pd) throws Exception {
		dao.save("DoctorAdditionBookingMapper.save", pd);
	}

	@Override
	public void delete(PageData pd) throws Exception {
		dao.delete("DoctorAdditionBookingMapper.delete", pd);
	}

	@Override
	public void edit(PageData pd) throws Exception {
		dao.update("DoctorAdditionBookingMapper.edit", pd);
	}

	@Override
	public PageData findById(PageData pd) throws Exception {
		return (PageData) dao.findForObject("DoctorAdditionBookingMapper.findById", pd);
	}

}
